//
//  STTextView.h
//
//  Created by yls on 14/12/11.
//  Copyright (c) 2014年 yls. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef void (^TextDidChangeBlock)(UITextView *);

NS_CLASS_AVAILABLE_IOS(2_0) @interface STTextView : UIView <UITextInputTraits>

@property(nonatomic,copy) NSString *text;
@property(nonatomic,retain) UIFont *font;
@property(nonatomic,retain) UIColor *textColor;
@property(nonatomic) NSTextAlignment textAlignment;    // default is NSLeftTextAlignment
@property(nonatomic) NSRange selectedRange;
@property(nonatomic,getter=isEditable) BOOL editable;
@property(nonatomic,getter=isSelectable) BOOL selectable NS_AVAILABLE_IOS(7_0); // toggle selectability, which controls the ability of the user to select content and interact with URLs & attachments

@property (nonatomic, strong) NSString *placeholder;
@property (nonatomic, assign) NSInteger maxLength;  // default is NSUIntegerMax

- (void)setTextDidChangeBlock:(TextDidChangeBlock)TextDidChangeBlock;

@end
